package com.changgou.goods.feign;

import com.changgou.entity.Result;
import com.changgou.goods.pojo.Sku;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author wz
 * @company 公司
 * @create 2020-03-19 16:08
 */
@FeignClient(name = "goods")
public interface SkuFeign {

    @GetMapping("/sku/spu/{spuId}")
     List<Sku> findSkuListBySpuId(@PathVariable("spuId") String spuId);

    @GetMapping("/sku/{id}")
    public Sku findById(@PathVariable String id);

    @PostMapping("/sku/decr/count")
    public Result decrCount(@RequestParam String username);

    @RequestMapping("/sku/resumeStockNum")
    public Result resumeStockeNum(@RequestParam("skuId") String skuId, @RequestParam("num") Integer num);
}
